//
//  OutlineItem.m
//  NVAReader
//
//  Created by DuyLK on 6/7/14.
//  Copyright (c) 2014 com.nva.nvareader. All rights reserved.
//

#import "OutlineItem.h"

@implementation OutlineItem

-(id) init{
    return [self initWithTitle:@"..." page:@"..."];
}

-(id) initWithTitle:(NSString *)title page:(NSString *)page
{
    self = [super init];
    if (self) {
        _title = [title copy];
        _childrenItem = [[NSMutableArray alloc] init];
        _page = [page copy];
    }
    return self;
}

-(void) addChildrenItem:(OutlineItem *)child
{
    [_childrenItem addObject:child];
}

-(void) dealloc
{
    [_title release];_title = nil;
    [_childrenItem release];_childrenItem = nil;
    [_page release];_page = nil;
    [super dealloc];
}
@end
